package com.example.analysis.controller;

import com.example.analysis.vo.CourseScoreVo;
import com.example.analysis.service.CourseService;
import com.example.analysis.utils.Response;
import com.example.analysis.vo.QuestScoreVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/pca")
@CrossOrigin
public class PCAController {
    @Autowired
    private CourseService courseService;

    @RequestMapping("/get_pca_details")
    public Response<QuestScoreVo> getPCADetails(String subId) {
        return courseService.getQuestScore(subId);
    }

    @RequestMapping("/get_pca_details_sup")
    public Response<QuestScoreVo> getPCADetailsSup(String subId) {
        return courseService.getQuestScoreSup(subId);
    }

    @RequestMapping("/get_pca_details_course")
    public Response<QuestScoreVo> getPCADetailsCourse(String classId) {
        return courseService.getQuestScoreCourse(classId);
    }
}
